home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 15
/
Aminet 15 - Nov 1996.iso
/
Aminet
/
disk
/
cdrom
/
SkandalfoCDP.lha
/
SCDPlayer
/
Rexx
/
PrintCDCover.scdp
< prev
next >
Wrap
Text File
|
1996-08-16
|
1KB
|
76 lines
/* SCDP Script for printing CD covers */
/* It's only an example, not very much useful. */
OPTIONS RESULTS
ESC=D2C(27)
BOLD=ESC"[1m"ESC'[4"z'
UNBOLD=ESC"[22m"ESC'[3"z'
PICA=ESC"[0w"
ENLARGEDON=ESC"[6w"
ENLARGEDOFF=ESC"[5w"
INIT=ESC"#1"ESC"[0z"
STATUS
IF RESULT=NODISK THEN RETURN
IF OPEN(PRINTER,"PRT:","W") THEN DO
CDARTIST
ART=RESULT
CDTITLE
TIT=RESULT
TRACKS
NUM=RESULT
DO WHILE LENGTH(ART)<22
ART=" "ART" "
END
DO WHILE LENGTH(TIT)<22
TIT=" "TIT" "
END
CALL WRITELN(PRINTER,INIT||PICA||ENLARGEDON||ART)
CALL WRITELN(PRINTER,BOLD||TIT||UNBOLD||ENLARGEDOFF)
CALL WRITELN(PRINTER,"")
DO I=1 TO NUM
TRACKNAME I
NAM=RESULT
TRACKSTART I
A=RESULT
TRACKEND I
B=RESULT
IF I<10 THEN
NU=" "I
ELSE
NU=I
DUR=(B-A)%75
MIN=DUR%60
SEC=DUR-MIN*60
IF LENGTH(SEC)<2 THEN SEC="0"SEC
IF LENGTH(MIN)<2 THEN MIN=" "MIN
TIM=" "MIN":"SEC
CAD=NU NAM||" "
DO WHILE LENGTH(CAD)<41
CAD=CAD"."
END
CALL WRITELN(PRINTER,CAD||TIM)
END
CALL CLOSE(PRINTER)
END